import request from './request'

export const getHistoryApi = () => {
  return request({
    url: '/search_history',
    method: 'get',
  })
}


export const addHistoryApi = (data) => {
  return request({
    url: '/search_history',
    method: 'post',
    data:data,
  })
}


export const updateHistoryApi = (id, data) => {
  return request({
    url: `/search_history/${id}`,
    method: 'put',
    data,
  })
}


export const deleteHistoryApi = (id) => {
  return request({
    url: `/search_history/${id}`,
    method: 'delete',
  })
}